package com.hys.vo;

import cn.hutool.core.bean.BeanUtil;
import com.hys.param.CooperContentParam;
import com.hys.param.CooperInfoParam;
import com.hys.param.CooperMethodParam;
import com.hys.param.EnterpriseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel
public class CooperInfoVO {

    @ApiModelProperty("info表ID")
    private Integer id;

    @ApiModelProperty("企业信息")
    private EnterpriseParam enterpriseParam;

    @ApiModelProperty("合作信息")
    private CooperInfoParam cooperInfoParam;

    @ApiModelProperty("合作方式")
    private CooperMethodParam cooperMethodParam;

    @ApiModelProperty("合作内容")
    private CooperContentParam cooperContentParam;

    /**
     * 转换为excel类型的vo
     * @return
     */
    public CooperExcelVO convertToExcelVO(){
        CooperExcelVO cooperExcelVO = new CooperExcelVO();
        EnterpriseParam enterpriseParam = this.getEnterpriseParam();
        BeanUtil.copyProperties(enterpriseParam, cooperExcelVO);
        CooperInfoParam cooperInfoParam = this.getCooperInfoParam();
        BeanUtil.copyProperties(cooperInfoParam, cooperExcelVO);
        CooperContentParam cooperContentParam = this.getCooperContentParam();
        BeanUtil.copyProperties(cooperContentParam, cooperExcelVO, "isCoopEffect");
        CooperMethodParam cooperMethodParam = this.getCooperMethodParam();
        BeanUtil.copyProperties(cooperMethodParam, cooperExcelVO, "isAcceptGraduate");
        return cooperExcelVO;
    }


}
